package com.qfedu.aunt.commons.result;

import lombok.Data;

/**
 * @author xiaobobo
 * @title: ResponseCode
 * @projectName aunt_commons_2209
 * @description: 返回状态信息的枚举
 * @date 2022/10/24  15:40
 */
public enum ResponseCode {

    SUCCESS(0,"请求成功"),
    ERROR(-1,"请求失败"),
    NULL_POINT_ERROR(100,"空指针异常"),
    SQL_ERROR(101,"SQL异常"),
    PARAMETER_ERROR(103,"请求参数异常"),
    TOKEN_ERROR(104,"TOKEN异常"),
    TELPNONE_NUM_ERROR(105,"电话号码不正确"),
    SEND_SMS_ERROR(106,"短信发送失败"),
    UN_AUTHORITION_EXCEPTION(401,"没有权限访问这个地址"),
    USERNAME_PASSWORD_EXCEPTION(108,"用户名或者密码不对"),
    AUTHTICATION_EXCEPTION(109,"用户认证失败"),
    REQUEST_EXCEPTION(110,"非法请求"),
    SLOT_ORDER_EXCEPTION(111,"SLOT没有设置运行顺序"),
    SLOT_IMPL_EXCEPTION(112,"SLOT没有实现类可以使用"),
    SLOT_NAME_EXCEPTION(113,"SLOT的名字和slot实例没有对应上"),
    LIMIT_MINITE_EXCEPTION(114,"超过了一分钟限流"),
    LIMIT_HOUR_EXCEPTION(115,"超过了一小时限流"),
    LIMIT_DAY_EXCEPTION(116,"超过了一天限流"),
    BLACK_EXCEPTION(117,"黑名单异常"),
    ADMIN_EXCEPTION(118,"id传递有误无法删除数据"),
    SYSTEM_ERROR(102,"系统异常");


    private Integer code;
    private String message;

    ResponseCode(Integer code,String message){
        this.code=code;
        this.message=message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
